mypy declaring incompatible types despit the fact that all types are explicit and using Union

Solving mypy Type Compatibility Issues in Python